//
// CChannelMixer.java
// Copyright (C) 2010  "Naush" <naush _ hotmail _ fr>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>./* ----------------------------------------------------------------------------







package org.ryzom.nel.threed;

import org.ryzom.nel.misc.CRefCount;

public class CChannelMixer extends CRefCount {
  private long swigCPtr;

  public CChannelMixer(long cPtr, boolean cMemoryOwn) {
    super(nel3dJNI.CChannelMixer_SWIGUpcast(cPtr), cMemoryOwn);
    swigCPtr = cPtr;
  }

  public static long getCPtr(CChannelMixer obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nel3dJNI.delete_CChannelMixer(swigCPtr);
      }
      swigCPtr = 0;
    }
    super.delete();
  }

  public CChannelMixer() {
    this(nel3dJNI.new_CChannelMixer(), true);
  }

  public void setAnimationSet(CAnimationSet animationSet) {
    nel3dJNI.CChannelMixer_setAnimationSet(swigCPtr, this, CAnimationSet.getCPtr(animationSet), animationSet);
  }

  public CAnimationSet getAnimationSet() {
    long cPtr = nel3dJNI.CChannelMixer_getAnimationSet(swigCPtr, this);
    return (cPtr == 0) ? null : new CAnimationSet(cPtr, false);
  }

  public void eval(boolean detail, java.math.BigInteger evalDetailDate) {
    nel3dJNI.CChannelMixer_eval__SWIG_0(swigCPtr, this, detail, evalDetailDate);
  }

  public void eval(boolean detail) {
    nel3dJNI.CChannelMixer_eval__SWIG_1(swigCPtr, this, detail);
  }

  public void evalChannels(SWIGTYPE_p_int channelIdArray, long numID) {
    nel3dJNI.CChannelMixer_evalChannels(swigCPtr, this, SWIGTYPE_p_int.getCPtr(channelIdArray), numID);
  }

  public void evalSingleChannel(int channelId) {
    nel3dJNI.CChannelMixer_evalSingleChannel(swigCPtr, this, channelId);
  }

  public int addChannel(String channelName, IAnimatable animatable, IAnimatedValue value, ITrack defaultValue, long valueId, long ownerValueId, boolean detail) {
    return nel3dJNI.CChannelMixer_addChannel(swigCPtr, this, channelName, IAnimatable.getCPtr(animatable), animatable, IAnimatedValue.getCPtr(value), value, ITrack.getCPtr(defaultValue), defaultValue, valueId, ownerValueId, detail);
  }

  public void resetChannels() {
    nel3dJNI.CChannelMixer_resetChannels(swigCPtr, this);
  }

  public void enableChannel(long channelId, boolean enable) {
    nel3dJNI.CChannelMixer_enableChannel(swigCPtr, this, channelId, enable);
  }

  public boolean isChannelEnabled(long channelId) {
    return nel3dJNI.CChannelMixer_isChannelEnabled(swigCPtr, this, channelId);
  }

  public void lodEnableChannel(long channelId, boolean enable) {
    nel3dJNI.CChannelMixer_lodEnableChannel(swigCPtr, this, channelId, enable);
  }

  public boolean isChannelLodEnabled(long channelId) {
    return nel3dJNI.CChannelMixer_isChannelLodEnabled(swigCPtr, this, channelId);
  }

  public void setSlotAnimation(long slot, long animation) {
    nel3dJNI.CChannelMixer_setSlotAnimation(swigCPtr, this, slot, animation);
  }

  public CAnimation getSlotAnimation(long slot) {
    long cPtr = nel3dJNI.CChannelMixer_getSlotAnimation(swigCPtr, this, slot);
    return (cPtr == 0) ? null : new CAnimation(cPtr, false);
  }

  public void setSlotTime(long slot, float time) {
    nel3dJNI.CChannelMixer_setSlotTime(swigCPtr, this, slot, time);
  }

  public void setSlotWeight(long slot, float weight) {
    nel3dJNI.CChannelMixer_setSlotWeight(swigCPtr, this, slot, weight);
  }

  public void emptySlot(long slot) {
    nel3dJNI.CChannelMixer_emptySlot(swigCPtr, this, slot);
  }

  public void resetSlots() {
    nel3dJNI.CChannelMixer_resetSlots(swigCPtr, this);
  }

  public void applySkeletonWeight(long slot, long skeleton, boolean invert) {
    nel3dJNI.CChannelMixer_applySkeletonWeight__SWIG_0(swigCPtr, this, slot, skeleton, invert);
  }

  public void applySkeletonWeight(long slot, long skeleton) {
    nel3dJNI.CChannelMixer_applySkeletonWeight__SWIG_1(swigCPtr, this, slot, skeleton);
  }

  public void resetSkeletonWeight(long slot) {
    nel3dJNI.CChannelMixer_resetSkeletonWeight(swigCPtr, this, slot);
  }

  public void resetEvalDetailDate() {
    nel3dJNI.CChannelMixer_resetEvalDetailDate(swigCPtr, this);
  }

  public final static int NumAnimationSlot = nel3dJNI.CChannelMixer_NumAnimationSlot_get();

}
